Repository navigation
Delete the old resource when its name follows a renamed schema - #7718
Merged
Merged
Conversation
… the wrong path (Badness) Co-authored-by: Isaac <no-reply@databricks.com>
…nt's rename A resource whose own name references a renamed resource's name (a secret named after a schema it does not live in) was treated as moved with it: its recreate deleted it at a path that does not exist and left the old one behind. parent_id_fields now lists the fields that name the parent (catalog_name, schema_name), and both the plan's follow check and the recreate's delete ID consult only those. Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
Contributor
|
Commit: Regression test reportSelected 1 changed tests (limit=20, 0 not selected) 2 tests: regression=2 unreleased=0 coverage=0 failing=0
TestAccept/bundle/resources/schemas/rename_referenced_by_name/DMS=: branch ✅ | main (4c8b7a1) ❌ | latest (v1.26.0) ❌main (4c8b7a1): latest (v1.26.0): TestAccept/bundle/resources/schemas/rename_referenced_by_name/DMS=true: branch ✅ | main (4c8b7a1) ❌ | latest (v1.26.0) ❌main (4c8b7a1): latest (v1.26.0): |
Collaborator
✅ Integration test reportCommit: dd3927f
Top 5 slowest tests (at least 2 minutes):
|
denik
added a commit
that referenced
this pull request
Nov 17, 2026
Only parent_id_fields (catalog_name, schema_name, from #7718) follow a parent's rename, so a name that references a renamed schema's name recreates the secret instead of re-keying it to a path that does not exist. Co-authored-by: Isaac <no-reply@databricks.com>
denik
added a commit
that referenced
this pull request
Nov 17, 2026
Only parent_id_fields (catalog_name, schema_name, from #7718) follow a parent's rename, so a name that references a renamed schema's name recreates the secret instead of re-keying it to a path that does not exist. Co-authored-by: Isaac <no-reply@databricks.com>
denik
marked this pull request as ready for review
November 18, 2026 13:26
denik
requested review from
Sankalp-Mittal,
andrewnester,
pietern,
rclarey,
shreyas-goenka and
simonfaltum
November 18, 2026 13:26
denik
enabled stacked auto-merge
November 18, 2026 13:27
andrewnester
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
A UC resource that takes its own name from another resource's name, and lives in a different schema, was treated as moved when that resource was renamed. For example, a secret in schema
sharedwithname: ${resources.schemas.app.name}: renamingapprecreated the secret, but the delete went toshared.<new app name>, which does not exist, and the old secret was left behind. Registered models had the same problem.Only the fields that name a resource's parent move it with the parent. A new
parent_id_fieldsconfig lists them (catalog_name,schema_name) for schemas, volumes, registered models and secrets, and both the plan's follow check and the recreate's delete ID now consult only those. Before, any field referencing the renamed resource counted, except a name that can be renamed in place.Found in review of #7381, where secrets start following a renamed parent. That PR and #7379 rebase on this one.
Tests
schemas/rename_referenced_by_name(Cloud = true): a model and a secret in a shared schema, named after another schema that gets renamed. The first commit records the bug (Badness): the delete went to the new name and the old model and secret stayed. Now the delete goes to their actual path, both are gone, and the redeploy is a no-op.This pull request and its description were written by Isaac.